// Credit.java
public class Credit extends Payment {
    private String number;
    private String type;
    private java.util.Date expireDate;

    public Credit(double amount, String number, String type, java.util.Date expireDate) {
        super(amount);
        this.number = number;
        this.type = type;
        this.expireDate = expireDate;
    }

    @Override
    public boolean processPayment() {
        System.out.println("使用信用卡支付 $" + getAmount());
        // 模拟支付成功逻辑
        return true;
    }
}